﻿using DXApplicationTangche.UC.订单一览新.订单预览新.service;
using mendian;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DXApplicationTangche.DTO
{
    public class CustomerChooseInfoDTO
    {
        public String id { get; set; }
        public String customerId { get; set; }//客户id
        public String customerName { get; set; }//客户名称
        public String mobile { get; set; }//手机
        public String createDate { get; set; }//创建时间
        public String customerCountName { get; set; }//客户量体名称
        public String addressId { get; set; }//地址id
        public String countId { get; set; }//量体id
        public List<CustomerFitRDTO量体值> customerFitRDTOS { get; set; }//客户量体
        public CustomerOrderCommitDTO customerOrderCommitDTO { get; set; }//收货信息

        public CustomerChooseInfoDTO()
        {

        }

        public List<CustomerInformation> getCustomerInformations()
        {
            List<CustomerInformation> customerInformations = new List<CustomerInformation>();
            if (!String.IsNullOrEmpty(this.countId))
            {
                customerInformations.Add(new CustomerInformation("量体人姓名", this.customerCountName));
                foreach (CustomerFitRDTO量体值 customerFitRDTO in this.customerFitRDTOS)
                {
                    customerInformations.Add(
                        new CustomerInformation(
                            customerFitRDTO.propertyNameCn,
                            String.IsNullOrWhiteSpace(customerFitRDTO.itemNameCn) ? customerFitRDTO.fitValue : customerFitRDTO.itemNameCn));
                }
                customerInformations.Add(new CustomerInformation("收货人姓名", this.customerOrderCommitDTO.customerName));
                customerInformations.Add(new CustomerInformation("收货人电话", this.customerOrderCommitDTO.mobile));
                customerInformations.Add(new CustomerInformation("收货省", this.customerOrderCommitDTO.addressProvince));
                customerInformations.Add(new CustomerInformation("收货市", this.customerOrderCommitDTO.addressCity));
                customerInformations.Add(new CustomerInformation("收货区", this.customerOrderCommitDTO.addressDistrict));
                customerInformations.Add(new CustomerInformation("收货详细地址", this.customerOrderCommitDTO.addressDetail));
            }
            return customerInformations;
        }
    }

    public class CustomerOrderCommitDTO
    {
        public String customerId { get; set; }//客户id
        public String customerName { get; set; }//收件人姓名
        public String mobile { get; set; }  //手机
        public String addressId { get; set; }//地址id
        public String addressProvince { get; set; }//省
        public String addressCity { get; set; }//市
        public String addressDistrict { get; set; }//区
        public String addressDetail { get; set; }//详细地址
        public String zipCode { get; set; }//邮编

        public CustomerOrderCommitDTO()
        {

        }
    }

    public class ViewCustomerDTO
    {
        public int customerId { get; set; }
        public String customerName { get; set; }
        public String mobile { get; set; }
        public DateTime createDate { get; set; }
        public String customerFitName { get; set; }
        public int customerFitId { get; set; }
        public String consignee { get; set; }
        public String consigneeAddress { get; set; }
        public String consigneeMobile { get; set; }
        public int addressId { get; set; }
        public String mnemonic { get; set; }

        public ViewCustomerDTO()
        {

        }
    }
}
